home *** CD-ROM | disk | FTP | other *** search
/ GFX Sensations 1 / Graphic Sensations - Volume 1.iso / tools / amiga / 3d_tools / irit40s.lha / Irit / prsr_lib / irit_soc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-30  |  1.3 KB  |  46 lines

  1. /*****************************************************************************
  2. *   Socket communication for IRIT.                         *
  3. *                                         *
  4. * Written by:  Gershon Elber                Ver 0.1, June 1993.  *
  5. *****************************************************************************/
  6.  
  7. #ifndef IRIT_SOC_H
  8. #define IRIT_SOC_H
  9.  
  10. #include "iritprsr.h"
  11. #include "allocate.h"
  12.  
  13. #ifdef OS2GCC
  14. #define IRIT_PIPE "\\pipe\\irit_os2"
  15. #define IRIT_PIPE_BUFFER_SIZE    1024
  16. #endif /* OS2GCC */
  17.  
  18. /* Prefix that will be sync'ed on before an object will be read from socket. */
  19. #define SOC_PREFIX_OBJ        "iritsocket"
  20. #define SOC_PREFIX_OBJ_LEN    10
  21. #define SOC_PREFIX_OBJ_LEN2    20
  22.  
  23. /* Name of service and default port number. */
  24. #define IRIT_TCP_SERVICE    "irit"
  25. #define IRIT_TCP_PORT        5432
  26.  
  27. /* Client routines. */
  28. int SocClientReadCharNonBlock(void);
  29. void SocClientUnReadChar(char c);
  30. char *SocClientReadLineNonBlock(void);
  31. void SocClientEchoInput(int EchoInput);
  32. int SocClientCreateSocket(void);
  33. void SocClientCloseSocket(void);
  34. IPObjectStruct *SocClientReadOneObject(void);
  35.  
  36. /* Server routines. */
  37. void SocServerWriteChar(char c);
  38. void SocServerWriteLine(char *Line, int LineLen);
  39. int SocServerCreateSocket(void);
  40. void SocServerAcceptConnection(void);
  41. int SocServerActive(void);
  42. void SocServerCloseSocket(void);
  43. void SocServerWriteOneObject(IPObjectStruct *PObj);
  44.  
  45. #endif /* IRIT_SOC_H */
  46.